<template>
    <FormItem :label="`${itemData.label}：`"
              :prop="itemData.name">
        <FormItem :label-for="itemData.name">
            <div class="qw-form-txt"
                 v-if="itemData.readonly"
                 v-html="formData[itemData.name]"></div>
            <i-quill v-else
                     :border="itemData.isBorder"
                     v-model="formData[itemData.name]"
                     @on-change="handleInputChange"
                     :min-height="itemData.minHeight" />
        </FormItem>
    </FormItem>
</template>
<script>
    import iQuill from '@/components/quill';
    export default {
        components: { iQuill },
        props: {
            itemData: {
                type: Object
            },
            formData: {
                type: Object
            }
        },
        data () {
            return {
                propName: '', // 校验规则名称
                dataList: []
            }
        },
        methods: {
            handleInputChange (event) {
                this.$emit('handleChangeFormData', this.formData);
            }
        }
    }
</script>
